home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / MeSsaGe_UTILS.ZIP / ReadMe < prev   
Text File  |  1997-12-26  |  3KB  |  72 lines

  1.  ————————————————————————
  2.   Message file utilities
  3.  ————————————————————————
  4.  
  5.  
  6. MsgUpdate
  7. ¯¯¯¯¯¯¯¯¯
  8. Despite being a very simple program, this little utility can be incredibly
  9. useful when updating a Message file’s translation.
  10.  
  11. Syntax:
  12. *MsgUpdate [-ForeignOld]|[-fo] <filename> [-ForeignNew]|[-fn] <filename>
  13. [-MyOld]|[-mo] <filename> [-Output]|[-o] <filename>
  14.  
  15. • ForeignOld file is the original Message file.
  16. • MyOld is your translation of ForeinOld, containing the same tags, but with
  17.   translated values.
  18. • ForeignNew is the new version of the original Message file, which may
  19.   contain some new tags, or in which the values of some old tags have been
  20.   changed.
  21. • the new file that MsgUpdate creates goes to Output
  22.  
  23. The program goes through ForeignNew line by line, writing any empty lines and
  24. comments it finds directly to Output (which means that any comments in MyOld
  25. are lost).
  26.  
  27. For each token *value* of ForeignNew, it searches for the same token *value*
  28. in ForeignOld. If this is found (i.e. the value didn’t change), it writes the
  29. corresponding translated value from MyOld to Output. If it is not found (i.e.
  30. the token value has changed, or a new token has been introduced), the
  31. original token and token value from ForeignNew are written to Output, but are
  32. preceded with “•” to make the line stand out so it can be easily found.
  33.  
  34. If an inconsistency between ForeignOld and MyOld is found, the line from
  35. ForeignNew is output, also preceded with “•”.
  36.  
  37. The program cannot handle tags that appear in the file more than once.
  38.  
  39.  
  40.  
  41. MsgDecode, MsgEncode
  42. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  43. These two small BASIC programs were designed to work on ArcWeb’s messages,
  44. but could also be adapted to work with those of other programs.
  45.  
  46. ArcWeb has a dictionary of the form:
  47.  
  48.     dict0:Click SELECT to
  49.     dict1:Click ADJUST to
  50.     dict2:M%34 %11 open the submenu
  51.  
  52. The dictionary entries are substituted for “%xx” in the strings, e.g.:
  53.  
  54.     mhM4:%0 quit %23
  55.  
  56. becomes “Click SELECT to quit ArcWeb”. As you can see above, even the
  57. dictionary entries can reference other dictionary entries.
  58.  
  59. MsgDecode expands all references, so that all dictionary tags and tags in the
  60. Message file after the last “dict” tag don’t contain any “%” codes any
  61. longer.
  62.  
  63. MsgEncode does the opposite, replacing strings with “%” codes. However, for
  64. this to work there must be no “%” references in the dictionary tags — if you
  65. change dictionary values, write the values out, the program will do the
  66. encoding for you.
  67.  
  68.  
  69.   __   _
  70.   |_) /|  Richard Atterer
  71.   | \/¯|  atterer@augsburg.baynet.de
  72.   ¯ ´` ¯